﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WPFLibraryReservation
{
    public static class ApplicationInterface
    {
        public static Reservations _app { get; set; }

        public static void AddEvent(string status)
        {
            if (_app != null)
                new ListBoxTextWriter(_app.GetEventListBox()).WriteLine(status);
        }
        public static void RequestBook(ReservationRequest request)
        {
            if (_app != null)
                _app.RequestBook(request);
        }
        public static void RespondToRequest(ReservationResponse response)
        {
            if (_app != null)
                _app.RespondToRequest(response);
        }
        public static void NewRequest(ReservationRequest request)
        {
            if (_app != null)
                _app.AddNewRequest(request);
        }
    }
}
